package ${packageName}.<#if (entity.moduleName != "")>${entity.moduleName}.</#if>entity;

<#if ((entity.mtms?size>0)||(entity.children?size>0))>
import java.util.List;
</#if>
<#if ((entity.mtms?size>0)||(entity.children?size>0))>
import java.util.ArrayList;
</#if>
<#if entity.hasDateType>
import java.util.Date;
</#if>
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import com.lmk.ms.common.entity.RecordEntity;

/**
* ${entity.entityComment}实体
* @author ${author}
* @email ${email}
*/
@Data
@Accessors(chain = true)
@Schema(description = "${entity.entityComment}")
@TableName("${entity.tableName}")
public class ${entity.entityName} extends RecordEntity<Integer> {
    private static final long serialVersionUID = ${entity.serialVersionUID}L;

    @Schema(description = "序号")
    @TableId(type = IdType.AUTO)
    private Integer ${entity.primaryKey.fieldName};

<#list entity.manyToOnes as manyToOne>
    /** ${manyToOne.entityComment} */
    @Schema(description = "${manyToOne.entityComment}")
    private ${manyToOne.entityName} ${manyToOne.entityNameLower};

</#list>
<#list entity.fields as field>
<#if (field.keyType != "ForeignKey")>
    /** ${field.comment} */
    @Schema(description = "${field.comment}")
    private ${field.fieldDataType} ${field.fieldName};

</#if>
</#list>
<#list entity.children as child>
    @Schema(description = "${child.entityComment}", dataType = "List")
    private List<${child.entityName}> ${child.entityNameLower}s = new ArrayList<${child.entityName}>(0);

</#list>
<#list entity.mtms as manyToMany>
    @Schema(description = "${manyToMany.entityComment}", dataType = "List")
    private List<${manyToMany.entityName}> ${manyToMany.entityNameLower}s = new ArrayList<${manyToMany.entityName}>(0);

</#list>
    public ${entity.entityName}() {
    }

    public ${entity.entityName}(Integer id) {
        this.id = id;
    }

}